package com.dsm.alilinkvisualappdemo

import android.app.Application
import android.content.Context
import com.aliyun.iot.aep.sdk.framework.AApplication
import com.dsm.alilinkvisualsdk.base.AliIOTSDKManager
import com.dwy.log.LogManager
import com.dwy.permission.PermissionManager
import com.dwy.permission.XXPermissionImpl
import com.dwy.tools.system.AppUtils

class DemoApp: AApplication() {
    override fun onCreate() {
        super.onCreate()

        //源码引用初始化
        //LinkVisualSDKManager.init(this)

        //lib引用初始化
        init(this)
    }

    private fun init(context: Context) {
        AppLogManager.init(context)
        LogManager.iLog.consoleLogSwitch = true
        AppHttpManager.init(context)
        PermissionManager.init(XXPermissionImpl())
        AppUtils.app = context.applicationContext as Application
        //AliIOTSDKManager.init(context, "334485606", "00d8cac1fdfd4c49baff53efeb36e5fb")
        AliIOTSDKManager.init(context, "334286251", "fbe3c85d38b9442c912a1413e6c0b528")
    }
}